﻿using System;
using Topshelf;

namespace Service
{
    class Program
    {
        static void Main(string[] args)
        {

            winprop_service s = new winprop_service();
            s.Start();
            //HostFactory.Run(x =>
            //{
            //    x.Service<winprop_service>(s =>
            //    {
            //        s.ConstructUsing(name => new winprop_service());
            //        s.WhenStarted(tc => tc.Start());
            //        s.WhenStopped(tc => tc.Stop());
            //    });

            //    x.RunAsLocalSystem();
            //    x.SetDescription("An service for genenrate winprop fingerprint database.");
            //    x.SetDisplayName("winprop_fingerprint");
            //    x.SetServiceName("winprop_fingerprint");

            //    x.EnableServiceRecovery(r =>
            //    {
            //        r.RestartService(1);
            //        r.SetResetPeriod(1);
            //    });
            //});
            Console.ReadKey();
        }
    }
}
